<?php
/**
 * CreateTime: 2023/11/15 10:17
 * User:LinQ
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('group_buying_activity', function (Blueprint $table) {
            // 数据库基本配置
            $table->engine = 'InnoDB';
            // 数据库字段
            $table->id('group_buying_activity_id')->comment("商品类型id");
            $table->integer('com_id')->comment("公司id");
            $table->string('goods_id')->nullable(false)->comment("商品id");
            $table->integer('start_time')->nullable(false)->comment("拼团开始时间");
            $table->integer('end_time')->nullable(false)->comment("拼团结束时间");
            $table->integer('group_status')->nullable(false)->comment("拼团状态 1.进行中 2.拼团成功 3.拼团失败");
            $table->integer('max_people')->nullable(false)->comment("最大拼团人数");
            $table->integer('join_customer_ids')->nullable(false)->comment("拼团参与人id");
            $table->integer('owner_id')->nullable(false)->comment("拼团发起人");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
